package C06.E2;

import java.util.ArrayList;
import java.util.LinkedList;

public class E2 {
    public static void main(String[] args) {
        LinkedList link = new LinkedList();
        link.add("张森");
        link.add("贾多多");
        link.add("孟小格");
        link.add("郭圈圈");
        link.add(Math.PI);
        //查看link长度
        System.out.println("集合长度:" + link.size());
        System.out.println(link);
        //查看指定位置元素
        System.out.println("第2个元素是:" + link.get(1));
        //修改指定元素
        link.set(2,"沐沐");
        System.out.println(link);
        link.add(2,"隔壁小付");
        System.out.println(link);
        link.remove(5);
        System.out.println(link);
    }
}
